<?php
/**
 * The Template for displaying all single posts.
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */

get_header(); ?>

<div class="projectfull">	
	<div id="title"><?php echo $post->post_title; ?></div>
	<img id="image" src="http://cdn.gametop.com/download-free-games/diamond-lines/b1.jpg">		
	<div id="meta">
		<?php include "SHARE-BOX.php" ?>
	</div>
	<div id="description">
		<?php echo $post->post_content;  ?>
	</div>

	<div class="projectcomments">
		<div id="commentheader">All Comments</div>
		<?php 
			$args = array('post_id' => $_GET['p']);
			$comments = get_comments($args); 
		?>
		<?php foreach($comments as $comment) : ?>		
			<div class="commentbox">
				<div id="commentcontent">
					<?php echo $comment->comment_content; ?>
				</div>
				<div id="commentmeta">
					<a><?php echo $comment->comment_author ?> </a> |
					<?php echo $comment->comment_date ?> 		
				</div><!-- #meta -->
			</div><!-- .activitybox -->
		<?php endforeach; ?>
	</div><!-- projectcomments -->

	<?php if($post->comment_status) ?>
	<div class="postcomment">
		<form action="" method="post">
			Post A Comment
			<input size="80" height="10" autocomplete="off" type="text" name="content" required><br>
    		<input type="Submit" name="Submit1"/>
		</form>   
	</div>
</div><!-- projectfull -->

<div class="projects">
	<div id="pagetitle">Top Projects</div>
	<?php query_posts('posts_per_page=5'); ?>
	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		<div class="projectbox">
			<img id="image" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcR50aIm-aqmY8doyUCZMwnzwbYiIG0eMeoIzRttRspGjlbiXbpv">
			<div id="name"><?php the_title() ?></div>	
			<div id="meta">
				<a> <?php the_author_posts_link() ?> </a> | 
				<?php the_time('m/d/y') ?> | 
				Rating
			</div>		
			<div id="description">
				<?php the_content() ?>
			</div>
		</div><!-- projectbox -->	
	<?php endwhile; else: ?>
	<?php endif; ?>
</div><!-- projects -->

<?php get_footer(); ?>